import { createStore, applyMiddleware } from "redux"
// createStore
import countReducer from "./count"
import thunk from "redux-thunk"
// 引入 redux-thunk ,用于支持异步action

// export const createAsync = (data, time) => {
//   return (dispatch) => {
//     setTimeout(() => {
//       dispatch(createStore(data))
//     }, time)
//   }
// }
// 异步action 不是必须要用的 非必须

export default createStore(countReducer, applyMiddleware(thunk))
